import { ref } from 'vue'

export function useSafeArea() {
  const { safeArea } = uni.getSystemInfoSync()
  const safeAreaBottom = ref(safeArea?.bottom ?? 0)
  const safeAreaTop = ref(safeArea?.top ?? 0)
  const safeAreaHeight = ref(safeArea?.height ?? 0)
  const safeAreaWidth = ref(safeArea?.width ?? 0)

  return {
    safeAreaBottom,
    safeAreaTop,
    safeAreaHeight,
    safeAreaWidth
  }
} 